-- GENERATED SPELL FOR [Acolyte] --


function spell0_27731(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(15244,pUnit)
pUnit:RegisterEvent('Sorts_27731', 8293, 1)
end

function spell1_27731(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(20828,pUnit)
pUnit:RegisterEvent('Sorts_27731', 8281, 1)
end

function spell2_27731(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(39621,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 24000, 1)
end

function spell3_27731(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(58811,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 24000, 1)
end

function spell4_27731(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(14875,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 30000, 1)
end

function spell5_27731(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(46190,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 30000, 1)
end

function spell6_27731(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(14145,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 616, 1)
end

function spell7_27731(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(20832,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 607, 1)
end

function spell8_27731(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17234,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 656, 1)
end

function spell9_27731(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17439,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27731', 602, 1)
end

function Sorts_27731(pUnit, Event)
local choix_sorts_27731 = math.random(0, 9)
if choix_sorts_27731 == 0 then
pUnit:RegisterEvent('spell0_27731', 1, 1)
end
if choix_sorts_27731 == 1 then
pUnit:RegisterEvent('spell1_27731', 1, 1)
end
if choix_sorts_27731 == 2 then
pUnit:RegisterEvent('spell2_27731', 1, 1)
end
if choix_sorts_27731 == 3 then
pUnit:RegisterEvent('spell3_27731', 1, 1)
end
if choix_sorts_27731 == 4 then
pUnit:RegisterEvent('spell4_27731', 1, 1)
end
if choix_sorts_27731 == 5 then
pUnit:RegisterEvent('spell5_27731', 1, 1)
end
if choix_sorts_27731 == 6 then
pUnit:RegisterEvent('spell6_27731', 1, 1)
end
if choix_sorts_27731 == 7 then
pUnit:RegisterEvent('spell7_27731', 1, 1)
end
if choix_sorts_27731 == 8 then
pUnit:RegisterEvent('spell8_27731', 1, 1)
end
if choix_sorts_27731 == 9 then
pUnit:RegisterEvent('spell9_27731', 1, 1)
end
end

function mob27731_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27731', math.random(1500, 3000), 1)
end

function mob27731_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27731_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27731_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27731, 1, 'mob27731_Action')
RegisterUnitEvent(27731, 2, 'mob27731_Leave')
RegisterUnitEvent(27731, 3, 'mob27731_Kill')
RegisterUnitEvent(27731, 4, 'mob27731_Die')
